package springBoot.akai.Akai.Controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import springBoot.akai.Akai.Mapper.VideoMapper;


@Controller
public class HomeController {
    @Autowired
    private VideoMapper videoMapper;

    @RequestMapping("/")
    String index(Model model) {
        model.addAttribute("videos", videoMapper.selectAll());

        return "home";
    }
}
